<?php
class tabla{
	public $filas;
	public $colores= array("#CECEF6","#F5A9A9","#FA5882","#FF0040","#F5A9F2","#0B610B",
							"#4B610B","#610B0B","#642EFE","#F6CECE","#B43104","#7401DF",
							"#013ADF","#393B0B","#FF0000","#EFEFFB","#A901DB","#F781BE",
							"#0B6138","#380B61","#FBEFF2","#F5BCA9","#E3CEF6","#0489B1",
							"#FE2E64","#8181F7","#FE2E9A","#A9BCF5","#DF7401","#FE9A2E",
							"#DF3A01","#2A1B0A","#FF4000","#86B404","#013ADF","#81F781",
							"#5882FA","#0A2229","#E0F8E0","#088A85","#8A0829","#F5BCA9",
							"#0A2A0A","#B4045F","#3B0B17","#A9F5F2","#5FB404","#F7FE2E",
							"#3B0B0B","#61210B");
	public $columnas;
	
	public function setdatos(){
		$this->columnas=$_POST['columnas'];
		$this->filas=$_POST['filas'];
		}
		
	public function Gen_Tabla(){
		echo "<br><br><center><table border=1 height=90% width=90%>\n";
			for($f=0;$f<$this->filas;$f++){
				echo "<tr>\n";
					for($c=0;$c<$this->columnas;$c++){
						echo "<td bgcolor=".$this->colores[rand(0,sizeof($this->colores)-1)].">&nbsp</td>\n";
						}
				echo "</tr>\n";
				}
		echo "</table>\n";
		
		}	
	}
$instancia = new tabla();

$instancia->setdatos();
$instancia->Gen_Tabla();



?>